package com.sofwin.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sofwin.dto.NavsDto;
import com.sofwin.dto.TreeNodeDto;
import com.sofwin.mapper.SResourceMapper;
import com.sofwin.service.ResourceService;
@Service
public class ResourceServiceImpl implements ResourceService {

	@Autowired
	private SResourceMapper mapper;
	@Override
	public List<NavsDto> listResources() {
		return mapper.selectResources();
	}
	@Override
	public List<TreeNodeDto> selectRoleResource(Integer roleId) {
		return mapper.selectRoleResources(roleId);
	}
	@Override
	public List<NavsDto> listResourcesByRoleId(Integer roleId) {
		return mapper.listResourcesByRoleId(roleId);
	}

}
